<?php 
session_start();
if(strlen($_SESSION["u_name"])== 0)
{
 header("Location:index.php");
}
include 'Classes/MyClass.php';
$objMyCass = new MyClass();
$userdetails = array();
$userdetails = $objMyCass->FetchUserRecords($_SESSION["user_id"]);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>B School Application Strategy</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="js/jquery-1.4.2.js" type="text/javascript" language="javascript"></script>
<script src="js/ajax.js" type="text/javascript" language="javascript"></script>
<script src="js/tab-view.js" type="text/javascript" language="javascript"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="css/tab-view.css" rel="stylesheet" type="text/css" />
<link href="cssbuttons.css" rel="stylesheet" type="text/css">
<link href="skins/sample/sample.css" rel="stylesheet" type="text/css">

</head>
<body>


<!-- container -->
<div id="container">
	<div class="center">
		<!-- header -->
		<div class="header">
			<div class="logo"><a href="#"><img src="images/logo.png" alt="" /></a></div>
			<div class="login">
				<div class="studentlogin">
					<!-- <h1>Student Login</h1>-->
					<div class="username">
						<!-- <p class="uname">Username:</p> -->
						<div class=""><!-- <input type="text" class="t_box" value="" /> --></div>
					</div>
					<div class="">
						<!-- <p class="uname">Password:</p> -->
						<div class=""><!-- <input type="password" class="t_box" value="" /> --></div>
					</div> 
					
				</div>
				
				<div class="logo1"><a href="#"><img src="images/logo1.png" alt="" /></a></div>
				<div style="text-align:right" >Welcome ,<?php print $_SESSION["u_name"];?>&nbsp;&nbsp;<a href="Logout.php">Log Out</a></div>
			</div>
			<div class="nav">
				<ul>
					<li><a href="Home.php" class="select" >Home</a></li>
					<li><a href="about-us.php">About Us</a></li>
					<li><a href="GmatPreparation.php">GMAT Preperation</a></li> 
					<li><a href="AdmissionConsulting.php">Admissions Consulting</a></li> 
					<li><a href="http://techbridge.co.in/Myforum/">MBA Forum</a></li> 
					<li><a href="#">Contact Us</a></li>
				</ul>
			</div>
		</div>
		<!-- header -->
		<!-- middle -->

		<div class="middle">
		<form id="frmbschool" name="frmbschool" action="BschoolSelection.php" method="post" >
		<table cellpadding="0" cellspacing="0" width="60%" align="center">
		<tr>
		<td align="center" class="lblText">
		<strong>Selecting the right B School application strategy:</strong>
		</td>
		</tr>
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		<tr>
		<td>
		1. In order to maximize chances of success and avoid disappointment we encourage applicant to make application to more than 1 school. The maximum we recommend is 10 keeping in mind the associated cost as well as dilution of focus which a large number brings.  Please answer the following questions to best understand your application strategy:
		</td>
		</tr>
		
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		
		<tr>
		<td>
		How important is it to get into a good business school this year: 
		<select id="selYear" name="selYear" class="inputgeneral" onchange="setYear();">
		<option value="0">-------</option>
		<option value="1">Must this year</option>
		<option value="2">Preferably this year</option>
		<option value="3">Can wait still next year</option>
		</select>
		</td>
		</tr>
		
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		
		
		<tr>
		<td>
		Keeping your profile assessment scores in mind, we would recommend that you apply to at least <input type="text" name="numberfrom" id="numberfrom" class="inputgeneral" style="width:30px" readonly="readonly" /> to <input type="text" name="numberto" id="numberto" class="inputgeneral" style="width:30px" readonly="readonly" />  business schools
		</td>
		</tr>
		
		
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		
		<tr>
		<td>
		Please indicate the number of applications you would like to do.
		</td>
		</tr>
		
		<tr>
		<td>
		<input class="inputgeneral" type="text" id="txtUserChoice" name="txtUserChoice" size="5" />
		</td>
		</tr>
		
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		
		<tr>
		<td>		
		<div class="cssbutton sample a">
			<input type="button" value="Continue" onclick="nextpage();" />
		</div>
		&nbsp;&nbsp;
		<div class="cssbutton sample a">
			<input type="button" value="back" onclick="javascript:history.go(-1);" />
		</div>
		</td>
		</tr>
		
		<tr>
		<td>&nbsp;
		
		</td>
		</tr>
		
		</table> 
		</form>
		
		<div class="bar"><img src="images/ftopbg.png" alt=""/></div>
			</div>
		<!-- /middle -->
		<!-- footer -->
			<div class="footer">
				<ul>
					<li><a href="Home.php">Home</a></li>
					<li>|</li>
					<li><a href="about-us.php">About Us</a></li>
					<li>|</li>
					<li><a href="GmatPreparation.php">GMAT Preperation</a></li>
					<li>|</li>
					<li><a href="AdmissionConsulting.php">Admissions Consulting</a></li>
					<li>|</li>
					<li><a href="http://topmbaconsultant.com/forum/">MBA Blog</a></li>
					<li>|</li>
					<li><a href="contact-us.php">Contact Us</a></li>
				</ul>
			</div>
		<!-- /footer -->
	</div>
</div>
<!-- / container -->
<script type="text/javascript">
function nextpage()
{
 var errmsg = "";
 if($("#selYear").val() == 0 )
 {
	 errmsg += "Please select any value from dropdown !";
 }
 if($("#txtUserChoice").val() == "")
 {
	 errmsg +="\n";
	 errmsg += "Please enter your choice of applications !";
 }
 if($("#txtUserChoice").val() > 20)
 {
	 errmsg +="\n";
	 errmsg += "You can choose maximum 20 schools for application !";
 }
 if(errmsg != "")
 {
	 alert(errmsg);
	 return false;
 }
 else
 {
	 $("#frmbschool").submit();
	 return true;
 }
 return true;
}

function setYear()
{
	 var applicationrating = "<?php print $_SESSION["application_rating"]; ?>";
	 var selYear =$("#selYear").val();
	 var errmsg = "";
	 
	 if(selYear == 0)
	 {
		errmsg += "Please select any one value from dropdown !"; 
		$("#numberfrom").val("");
		$("#numberto").val("");	
	 }
	 if(applicationrating >= 7.5 && applicationrating <= 10)
	 {
		 if(selYear == 1)
		 {
			$("#numberfrom").val(4);
			$("#numberto").val(5);			 
		 }
		 else if(selYear == 2)
		 {
			$("#numberfrom").val(3);
			$("#numberto").val(4);			 
		 }
		 else if(selYear == 3)
		 {
			$("#numberfrom").val(2);
			$("#numberto").val(3);			 
		 }
	 }
	 else  if(applicationrating >= 5 && applicationrating <= 7.4)
	 {
		 if(selYear == 1)
		 {
			$("#numberfrom").val(5);
			$("#numberto").val(6);			 
		 }
		 else if(selYear == 2)
		 {
			$("#numberfrom").val(4);
			$("#numberto").val(5);			 
		 }
		 else if(selYear == 3)
		 {
			$("#numberfrom").val(3);
			$("#numberto").val(4);			 
		 }
	 }
	 else  if(applicationrating >= 2.5 && applicationrating <= 4.9)
	 {
		 if(selYear == 1)
		 {
			$("#numberfrom").val(6);
			$("#numberto").val(7);			 
		 }
		 else if(selYear == 2)
		 {
			$("#numberfrom").val(5);
			$("#numberto").val(6);			 
		 }
		 else if(selYear == 3)
		 {
			$("#numberfrom").val(4);
			$("#numberto").val(5);			 
		 }
	 }
	 else  if(applicationrating >= 0 && applicationrating <= 2.4)
	 {
		 if(selYear == 1)
		 {
			$("#numberfrom").val(7);
			$("#numberto").val(8);			 
		 }
		 else if(selYear == 2)
		 {
			$("#numberfrom").val(6);
			$("#numberto").val(7);			 
		 }
		 else if(selYear == 3)
		 {
			$("#numberfrom").val(5);
			$("#numberto").val(6);			 
		 }
	 }

	 if(errmsg !="")
	 {
		 alert(errmsg);
	 }
	 
}
</script>
 </body>
</html>